<?php 
//error_reporting(E_ALL);
$title='';
require_once("include/conn.php");
require_once("include/config.php");
require_once("include/page.php");

$sql="SELECT  date_format(tdate, '%Y-%m') as title ,count(title) as nums,date_format(tdate, '%Y-%m') as tdate,date_format(tdate, '%Y%m') as link 
FROM  `bl_scrk` where  isdel='0' 
group by date_format(tdate, '%Y%m')  
order by date_format(tdate, '%Y%m') DESC  ";  

if(isset($_GET["title"]) and  $_GET["title"]==$danyear and $_GET["type"]=="rili"){
	//2008年生产任务日历报表
	//罗列出本年度每月列表
	$title=$danyear."年生产任务日历报表 ";
	$sql_all="SELECT date_format(tdate, '%Y%m') as link,date_format(tdate, '%Y-%m') as tt  FROM  `bl_scrk` where  isdel='0' and date_format(tdate, '%Y') ='".$_GET["title"]."' group by date_format(tdate, '%Y%m') order by date_format(tdate, '%Y%m')  ";
	$cn_all=mysql_db_query($db_name,$sql_all);
	if(!$row=mysql_num_rows($cn_all)){			
		back("还没有对应记录!");		
	}			
}	

//echo $sql;exit;

//此项主要是为任务指标日历而设立，它不需要分页，而将一年12个月显示出来就行了     
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $title ?></title>
</head>
<STYLE type=text/css>BODY {
	FONT-SIZE: 9pt
}
TABLE {
	FONT-SIZE: 9pt
}
</STYLE>
<body>
 <?php	 include("include/top.php"); ?>	
<TABLE width=779 border=0 align="center" cellPadding=0 
cellSpacing=0 borderColor=#111111 id=AutoNumber1 style="BORDER-COLLAPSE: collapse">
  <TBODY>
  <TR>
    <TD>      
      <P align=center><FONT color=#000000><B 
      style="FONT-SIZE: 16pt"><?php echo $title ?></B></FONT></P>
      <DIV align=center>
      <CENTER>
      <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#336699 height=25 
      cellSpacing=0 cellPadding=2 width=100% border=1>
        <TBODY>
        <TR bgColor=#cccccc>
          <TD width=43 bgColor=#e8e8e8 height=25>序号</TD>
          <TD width=455 bgColor=#e8e8e8 height=12>标题</TD>
          <TD width=131 bgColor=#e8e8e8 height=12>修改日期</TD>
		 	 <?php 
			 $i=1;
		 while($row = mysql_fetch_array($cn_all)){
		 ?>      
		  </TR>
        <TR>
          <TD height=25><?php echo $i; ?></TD>
          <TD height=16 align="left">
		  <?php echo "<a href=";
			  echo "'scrkshow.php?title=".$row["link"]."&type=rili' target='_blank' >[任务指标]".cdate($row["tt"])."月度详细资料表";	
		  echo "</a>";?>		  </TD>
          <TD height=1><?php echo $row["tt"]; ?></TD></TR>
		  <?php 
		   $i++;
		  }?>
		  </TBODY></TABLE></CENTER></DIV>
</TD></TR></TBODY></TABLE>
<?php include("include/bot.php"); ?>
</body>
</html>
